package me.CSmethod.demo;

public class Text82 {
    public static void main(String[] args) {
        int number=1983;
        int count=0;
        int temp=number;
        while(number!=0){
            number=number/10;
            count++;
        }
        int a[]=new int[count];
        int index= a.length-1;
        while(temp!=0){
            int b=temp%10;
            temp=temp/10;
            a[index]=b;
            index--;
        }
        for (int i = 0; i < a.length; i++) {
            a[i]=a[i]+5;
        }
        for (int i = 0; i < a.length; i++) {
            a[i]=a[i]%10;
        }
        for(int i=0,j=a.length-1;i<j;i++,j--){
            int temp1=a[i];
            a[i]=a[j];
            a[j]=temp1;
        }
        int number1=0;
        for (int i = 0; i < a.length; i++) {
            number1=number1*10+a[i];
        }
        System.out.println(number1);
    }
}
